import React, {Component} from 'react'
import { View, Text, SafeAreaView } from 'react-native'

class WelcomePage extends Component {
    constructor(props){
        super(props)
        this.timer = null
    }
    componentDidMount(){
        this.timer = setTimeout(() => {
            this.props.navigation.navigate('Main')
        }, 2000)
    }
    componentWillUnmount(){
        this.timer && clearTimeout(this.timer)
    }

    render(){
        return (
            <SafeAreaView>
                <Text>WelcomePage</Text>
            </SafeAreaView>
        )
    }
}

export default WelcomePage